Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email notification tasks and templates #472 #485

Merged
merged 16 commits into from
Nov 13, 2023

Conversation

nirmeen
Copy link
Collaborator

@nirmeen nirmeen commented Oct 27, 2023

Implement email notification tasks:

  • report_notifications_upcoming_events_errors_for_datasteward
  • send_notifications_for_user_upcoming_events
  • send_missed_notifications_for_user_upcoming_events

Implement email templates to send a listing of notifications by entity name

nirmeen added 6 commits October 27, 2023 15:41
Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
…by execution date and missed notifications

Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
… to display object name

Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
@nirmeen nirmeen marked this pull request as ready for review November 3, 2023 14:50
Comment on lines 58 to 61
print(
f"Failed: An error occurred while sending Email notification error report for data-stewards."
f" Error: {e}"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be removed no? Also, is it intentional for the error to not be raised again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it could be removed. The idea was that we log the error and then send datastewards an email in case of notification error and continue to the next user. you think we should raise the error anyways?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense. I think the error email should be sent at the very end though, or we risk sending an email for every user on some days.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought it is one email per user. I felt it would be easier for data stewards to track which user notifications errors they checked and which they didn't. Otherwise. if all users in one email it might be long and maybe they will not be able to keep track of where they stopped.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the print is back :/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, removed it now.

notification/tasks.py Outdated Show resolved Hide resolved
notification/tasks.py Outdated Show resolved Hide resolved
nirmeen added 2 commits November 6, 2023 14:42
Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
Signed-off-by: nirmeen <nirmeen.sallam@uni.lu>
@Fancien Fancien self-requested a review November 8, 2023 14:40
nirmeen added 2 commits November 10, 2023 16:51
…st for send notification and changed profile to notification settings
Copy link
Collaborator

@Fancien Fancien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

Comment on lines 58 to 61
print(
f"Failed: An error occurred while sending Email notification error report for data-stewards."
f" Error: {e}"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the print is back :/

@nirmeen nirmeen merged commit 52fd8b0 into develop Nov 13, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants